﻿@using System.Globalization

<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <title>@ViewData["Title"] - SimplCommerce</title>

        <link simpl-append-version="true" rel="stylesheet" href="~/lib/bootstrap/css/bootstrap.css" />
        <link simpl-append-version="true" rel="stylesheet" href="~/lib/font-awesome/css/font-awesome.css" />
        <link simpl-append-version="true" rel="stylesheet" href="~/lib/bootstrap-star-rating/css/star-rating.css" />
        <link simpl-append-version="true" rel="stylesheet" href="~/modules/core/site.css" />

        @RenderSection("head", required: false)
    </head>
    <body>
        <div class="top-bar">
            <div class="container">
                <ul class="list-inline list-unstyled pull-right">
                    @await Html.PartialAsync("_SelectLanguagePartial")
                    @await Html.PartialAsync("_LoginPartial")
                </ul>
            </div>
        </div>
        <div class="main-header">
            <div class="container">
                <div class="row">
                    <div class="col-xs-12 col-md-4 logo">
                        <a asp-controller="Home" asp-action="Index">
                            <img alt="SimplCommerce" src="~/modules/core/Logo_SimplCommerce.png" />
                        </a>
                    </div>
                    <div class="col-xs-10 col-md-7 search-box">
                        @await Component.InvokeAsync("SearchForm")
                    </div>
                    <div class="col-xs-2 col-md-1 cart-btn">
                        @await Component.InvokeAsync("CartBadge")
                    </div>
                </div>
            </div>
        </div>
        <div class="navbar navbar-default main-nav">
            <div class="container">
                <div class="navbar-header">
                    <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-responsive-collapse">
                        <span class="sr-only">Toggle navigation</span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                    </button>
                </div>
                <div class="collapse navbar-collapse navbar-responsive-collapse">
                    @await Component.InvokeAsync("CategoryMenu")
                </div>
            </div>
        </div>
        <div class="container body-content">
            @RenderBody()
        </div>
        <div class="footer-content">
            <div class="container">
                <div class="row">
                    <div class="col-md-3">
                        <h4>@Localizer["Customer Service"]</h4>
                        <vc:menu menu-id="1"></vc:menu>
                    </div>
                    <div class="col-md-3">
                        <h4>Information</h4>
                        <vc:menu menu-id="2"></vc:menu>
                    </div>
                    <div class="col-md-6">
                        <h4>SimplCommerce</h4>
                        <p>The first ecommerce system built on .NET Core.</p>
                        <p>Simple to use and easy to customize</p>
                        <p>Cross platform and Open source</p>
                    </div>
                </div>
                <hr />
                <p class="pull-left">&copy; @DateTime.Now.Year - SimplCommerce</p>
                <p class="pull-right">Powered by <a href="http://www.SimplCommerce.com"><strong>SimplCommerce</strong></a></p>
            </div>
        </div>
        <div id="shopModal" class="modal fade" tabindex="-1" role="dialog">
            <div class="modal-dialog">
                <div class="modal-content">
                </div>
            </div>
        </div>
        <script>
            window.simplGlobalSetting = {};
            window.simplGlobalSetting.lang = '@CultureInfo.CurrentCulture.Name';
        </script>
        <script simpl-append-version="true" src="~/lib/jquery/jquery.js"></script>
        <script simpl-append-version="true" src="~/lib/bootstrap/js/bootstrap.js"></script>
        <script simpl-append-version="true" src="~/lib/matchheight/jquery.matchHeight.js"></script>
        <script simpl-append-version="true" src="~/lib/bootstrap-star-rating/js/star-rating.js"></script>
        @if (CultureInfo.CurrentCulture.Name == "vi-VN")
        {
            <script simpl-append-version="true" src="~/lib/bootstrap-star-rating/js/locales/vi-vn.js"></script>
        }
        <script simpl-append-version="true" src="~/modules/core/main.js"></script>
        <script simpl-append-version="true" src="~/modules/orders/add-to-cart.js"></script>
        <script simpl-append-version="true" src="~/modules/product-comparison/product-comparison.js"></script>
        @RenderSection("scripts", required: false)
    </body>
</html>
